package com.iwhalecloud.bss.kite.cucc.service.attr.greenWayOrder;

import com.iwhalecloud.bss.kite.cucc.client.api.attr.IGreenWayOrderService;
import com.iwhalecloud.bss.kite.cucc.service.attr.greenWayOrder.handlers.InternetGreenWayOrderServiceImpl;
import com.iwhalecloud.bss.kite.cucc.service.attr.greenWayOrder.handlers.SDHGreenWayOrderHandler;
import com.ztesoft.bss.common.util.SpringUtil;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * 绿色工单相关业务类
 */
@Service
public class LocalGreenWayOrderService {

    private static Map<String, IGreenWayOrderService> handlerMaps = new HashMap<>();

    static {
        handlerMaps.put("2004020", SpringUtil.getBean(SDHGreenWayOrderHandler.class));
        handlerMaps.put("2004021", SpringUtil.getBean(SDHGreenWayOrderHandler.class));
        handlerMaps.put("2004022", SpringUtil.getBean(SDHGreenWayOrderHandler.class));
        handlerMaps.put("2004023", SpringUtil.getBean(SDHGreenWayOrderHandler.class));
        handlerMaps.put("2004029", SpringUtil.getBean(InternetGreenWayOrderServiceImpl.class));
    }

    public IGreenWayOrderService getHandlerByCateId(String cateId) {
        return handlerMaps.get(cateId);
    }
}
